A Persistent Hyper-Programming System
نویسندگان
چکیده
We demonstrate the use of a hyper-programming system in building persistent applications. This allows program representations to contain type-safe links to persistent objects embedded directly within the source code. The benefits include improved efficiency and potential for static program checking, reduced programming effort and the ability to display meaningful source-level representations for first-class procedure values. Hyper-programming represents a completely new style of programming which is only possible in a persistent programming system. 1. Hyper-programming Persistent programming languages were developed in an effort to reduce the burden on the application programmer of organising the transfer of long-term data between volatile program storage and non-volatile storage. Previously, application data which was to be retained between activations had to be written explicitly to a database or file system, and later read in again to the application space. The flattening and rebuilding of data structures that this required involved a significant programming overhead, and an increased intellectual effort since the programmer had to keep track of a three way mapping between program representation, database/file representation and the real world. The introduction of orthogonally persistent languages meant that any program data could be made persistent simply by identifying it as such, with all transfers between memory hierarchy layers handled transparently. The treatment of source programs as strongly typed persistent objects, which is made possible by the use of a Persistent Object System (POS) as the support platform, permits a new approach to program construction. Hyperprogramming involves storing strongly typed references to other persistent objects within a source program representation. Thus the source code entity is represented by a graph rather than a linear text sequence. By analogy with hyper-text this is called a hyper-program. It may be considered as similar to a closure, in that it contains both a textual program and an environment in which non-locally declared names may be resolved. The difference is that now the environment is explicitly constructed by the programmer who specifies persistent objects to be bound into the hyper-program at construction time. The support of hyper-program construction techniques by a POS provides a number of advantages: • Program succinctness: textual descriptions of the locations and types of persistent components used may be replaced by simple embedded references. • Increased execution efficiency: checking the validity of specified access paths to other components is factored out when they are embedded directly in the source program. Checking of type consistency may be performed at compilation time rather than execution time. • Reliable access to components: where a textual description of a component is replaced by a direct reference, the underlying referential integrity of the POS ensures that the component will always be accessible by the program. By contrast, where a textual description is used it may be invalid by the time the program executes, even if it was valid when the program was constructed. • Automatic source code retention: the hyper-program notation may also be used to represent procedure closures,with encapsulated state. This source representation can be recorded by the POS when the procedure is created, and permanently associated with the procedure by recording a reference to it in the closure value. We demonstrate a prototype hyper-programming system based on the Napier88 persistent language. At its core are a hyper-program editor and an object browser. The programmer uses the browser to locate objects of interest in the persistent store, and then embeds links to those objects into the hyper-program under construction. The editor displays buttons within the program text to denote the links; when a button is pressed the corresponding object is displayed by the object browser. We show how these techniques may be used to construct and alter persistent applications.
منابع مشابه
Demonstration of Hyper-Programming in JavaTM
We demonstrate the use of a hyper-programming system to build persistent Java applications in PJama, an orthogonally persistent version of JavaTM. This allows program representations to contain type-safe links to persistent objects embedded directly within the source code. The potential benefits include greater potential for static program checking, improved efficiency, and reduced programming ...
متن کاملHyper-Programming in Java
We demonstrate the use of a hyper-programming system to build persistent Java applications in PJama, an orthogonally persistent version of Javaa. This allows program representations to contain type-safe links to persistent objects embedded directly within the source code. The potential benefits include greater potential for static program checking, improved efficiency, and reduced programming e...
متن کاملReflection and hyper-programming in persistent programming systems
In an orthogonally persistent programming system, data is treated in a manner independent of its persistence. This gives simpler semantics, allows the programmer to ignore details of long-term data storage and enables type checking protection mechanisms to operate over the entire lifetime of the data. The ultimate goal of persistent programming language research is to reduce the costs of produc...
متن کاملSTART: A Linguistic Reflection Tool Using Hyper-Program Technology
The mechanism of linguistic reflection allows a programming system to generate new program fragments and incorporate them into the system. Although this ability has important applications in persistent systems, its use has been limited by the difficulty of writing reflective programs. This paper analyses the reasons for this difficulty and describes START, a hyper-text based tool for reflection...
متن کاملPersistent Hyper-Programs
The traditional representation of a program as a linear sequence of text forces a particular style of program construction to ensure good programming practice. Tools such as syntax directed editors, compilers, linkers and file managers are required to translate and execute these linear sequences of text. At some stage in the execution sequence the source text is checked for type correctness and...
متن کامل